package com.htpay.service.impl;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.htpay.mapper.MerchantOrderMapper;
import com.htpay.model.entity.MerchantOrder;
import com.htpay.service.IMerchantOrderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

/**
 * 服务类
 * <p>
 * 商户订单表 - 实现类
 */
@Service
public class MerchantOrderServiceImpl extends ServiceImpl<MerchantOrderMapper, MerchantOrder> implements IMerchantOrderService {

    @Autowired
    MerchantOrderMapper merchantOrderMapper;

    @Override
    public String insert(MerchantOrder order) {
        merchantOrderMapper.insert(order);
        return order.getId();
    }

    @Override
    public MerchantOrder queryOrderByMCode(String merchantOrderCode) {
        return merchantOrderMapper.queryMerchantOrderByMerchantCode(merchantOrderCode);
    }
}
